//
//  Player.m
//  tp1-gti350
//
//  Created by Coulon-Hamelin, Alexandre on 13-09-19.
//  Copyright (c) 2013 Coulon-Hamelin, Alexandre. All rights reserved.
//

#import "Player.h"

@implementation Player

-(id) initWithEverything:(int)number AndFirstName:(NSString*) firstName AndLastName:(NSString*) lastName

{
    
    self.number = number;
    
    self.firstName = firstName;
    
    self.lastName = lastName;
    
    self.goals = 0;
    
    self.passes = 0;
    
    
    
    return self;
    
}

-(int) getPoints
{
    return self.goals + self.passes;
}

-(NSString *) getPlayerResults
{
    NSString * stringToReturn  = [NSString stringWithFormat:@" %@ %dB %dP \n",self.lastName,self.goals,self.passes];
    
    return stringToReturn;
}
@end
